package com.wan.service.impl;

import com.wan.dao.LogMapper;
import com.wan.pojo.Log;
import com.wan.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;
@Service

public class LogServiceImpl implements LogService {
    @Autowired
    private LogMapper logMapper;
    public int add(Log log) {
        return logMapper.add(log);
    }

    public int add(String content) {
        Log log=new Log();
        log.setContent(content);
        log.setCreateTime(new Date());
        return logMapper.add(log);
    }

    public List<Log> findList(Map<String, Object> queryMap) {
        return logMapper.findList(queryMap);
    }

    public int getTotal(Map<String, Object> queryMap) {
        return logMapper.getTotal(queryMap);
    }

    public int delete(String ids) {
        return logMapper.delete(ids);
    }
}
